﻿@using HCQ2_Model.ExtendsionModel
@{
    Layout = null;
}
<!doctype html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <title>@HCQ2_Common.LangHelper.GetValue("GeneralJson.LoginTitle")</title>
    <!--加载通用合并 js,css-->
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
    <link href="~/Resources/mainFrame/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet"/>
    <link href="~/Resources/mainFrame/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet"/>
    <link href="~/Resources/mainFrame/css/animate.min.css" rel="stylesheet"/>
    <link href="~/Resources/mainFrame/css/style.min862f.css?v=4.1.0" rel="stylesheet"/>
    <link href="~/Resources/mainFrame/css/plugins/bootstrap-select/bootstrap-select.min.css" rel="stylesheet" />

    <script src="~/Lang/GetLangData"></script>
    <script src="~/Resources/myScript/loadWindow.js"></script>
    @Scripts.Render("~/bundles/mainScript")
    <script src="~/Resources/layer-3.0.1/layer.js"></script>
    <script src="~/Resources/tools/custom.js"></script>
    <script src="~/Resources/tools/jquery-hcq2-extend.js"></script>
    <script src="~/Resources/myScript/Main/mainIndex.js"></script>
    <script src="~/Resources/mainFrame/js/plugins/select/bootstrap-select.min.js"></script>
    <script src="~/Resources/mainFrame/js/Cookies.js"></script>
    <!--验证-->
    <script src="~/Resources/mainFrame/js/plugins/layer/laydate/laydate.js"></script>
    <script src="~/Resources/mainFrame/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="~/Resources/mainFrame/js/plugins/validate/messages_zh.min.js"></script>
    <script src="~/Resources/mainFrame/js/demo/form-validate-demo.min.js"></script>
    <script src="~/Resources/mainFrame/js/jquery.form.min.js"></script>
    <style>
        .nav > li > a {
            font-family: "微软雅黑";
            font-size: 15px;
        }
    </style>
    <script>
        showLoadBoxs();
    </script>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
<div id="wrapper">
<!--左侧导航开始-->
<nav class="navbar-default navbar-static-side" role="navigation">
    <div class="nav-close">
        <i class="fa fa-times-circle"></i>
    </div>
    <div class="sidebar-collapse">
        <ul class="nav" id="side-menu">
            <li class="nav-header" style="padding-top: 20px;">
                <div class="dropdown profile-element" style="text-align: center;">
                    <span>
                        @{
                            if (!string.IsNullOrEmpty(ViewBag.ownHead))
                            {
                                <img alt="image" id="ownHead" class="img-circle" style="width: 100px; height: 100px;" src="@ViewBag.ownHead" />
                            }
                            else
                            {
                                <img alt="image" id="ownHead" class="img-circle" style="width: 100px; height: 100px;" src="~/Resources/mainFrame/img/head.png" />
                            }
                        } 
                    </span>
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <span class="clear" style="padding-top: 6px;">
                                    <span class="text-muted text-xs block">@ViewBag.myUser.user_name<b class="caret"></b></span>
                                </span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <li>
                            @*<a class="J_menuItem" href="@Url.Action("HeadImgList", "Main")">修改头像</a>*@
                            <a id="btnChangeHeader" class="J_menuItem" href="@Url.Action("HeadPortrait", "Main")">@HCQ2_Common.LangHelper.GetValue("PageMain.mainEditHeader")</a>
                        </li>
                        <li><a href="#" onclick="mainManager.editUser()">@HCQ2_Common.LangHelper.GetValue("PageMain.mainUserInfo")</a></li>
                        <li><a href="#" onclick="mainManager.resetPassword()">@HCQ2_Common.LangHelper.GetValue("PageMain.mainResetPwd")</a></li>
                        <li class="divider"></li>
                        <li>
                            <a href="@Url.Action("Login", "SysLogin")">@HCQ2_Common.LangHelper.GetValue("PageMain.mainLogout")</a>
                        </li>
                    </ul>
                </div>
                <div class="logo-element">
                    HCQ2
                </div>
            </li>
            <script type="text/javascript">
                //mainManager.initMenuList();
            </script>
        </ul>
    </div>
</nav>
<!--左侧导航结束-->
<!--右侧部分开始-->
<div id="page-wrapper" class="gray-bg dashbard-1">
    <div class="row border-bottom">
        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header" style="width:700px;">
                <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
                <div>
                    <img id="logoUrl" src="" width="600" height="60" />
                    @*@{
                        if (string.IsNullOrEmpty(ViewBag.logoUrl))
                        {
                            <img id="logoUrl" src="~/Resources/mainFrame/img/main/main_head.png" width="600" height="60" />
                        }
                        else
                        {
                            <img id="logoUrl" src="@ViewBag.logoUrl" width="600" height="60" />
                        }
                    }*@
                </div>
            </div>
            <ul class="nav navbar-top-links navbar-right">
                <li class="dropdown hidden-xs" style="width:150px;">
                    <select id="langCode" name="langCode" title="@HCQ2_Common.LangHelper.GetValue("PageMain.changeLanguage")" class="form-control show-tick selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("PageMain.changeLanguage")">
                    </select>
                </li>
                <!--  首页 -->
                <li class="hidden-xs">
                    <a href="@Url.Action("IndexPage", "Main")" class="J_menuItem" data-index="1"><i class="fa fa-home"></i> @HCQ2_Common.LangHelper.GetValue("PageMain.mainPage")</a>
                </li>
                <li class="dropdown hidden-xs">
                    <a class="right-sidebar-toggle" aria-expanded="false">
                        <i class="fa fa-tasks"></i> @HCQ2_Common.LangHelper.GetValue("PageMain.mainThemeSet")
                    </a>
                </li>
                @*<li class="hidden-xs">
                    <a href="~/error.html?40" class="J_menuItem" data-index="0"><i class="fa fa-cart-arrow-down"></i> @HCQ2_Common.LangHelper.GetValue("PageMain.mainContact")</a>
                </li>*@
            </ul>
        </nav>
    </div>
    <div class="row content-tabs">
        <button class="roll-nav roll-left J_tabLeft">
            <i class="fa fa-backward"></i>
        </button>
        <nav class="page-tabs J_menuTabs">
            <div class="page-tabs-content">
                <a href="javascript:;" class="active J_menuTab" data-id="@Url.Action("IndexPage", "Main")">@HCQ2_Common.LangHelper.GetValue("PageMain.mainPage")</a>
                @*<a href="javascript:;" class="active J_menuTab" data-id="@Url.Action("VRList", "SourceManager",new { pageType= "VRWorks", doc_type=3 })">@HCQ2_Common.LangHelper.GetValue("PageMain.mainPage")</a>*@
            </div>
        </nav>
        <button class="roll-nav roll-right J_tabRight">
            <i class="fa fa-forward"></i>
        </button>
        <div class="btn-group roll-nav roll-right">
            <button class="dropdown J_tabClose" data-toggle="dropdown">
                @HCQ2_Common.LangHelper.GetValue("PageMain.mainClosing")<span class="caret"></span>
            </button>
            <ul role="menu" class="dropdown-menu dropdown-menu-right">
                <li class="J_tabShowActive">
                    <a>@HCQ2_Common.LangHelper.GetValue("PageMain.mainCurrentTab")</a>
                </li>
                <li class="divider"></li>
                <li class="J_tabCloseAll">
                    <a>@HCQ2_Common.LangHelper.GetValue("PageMain.mainCloseAll")</a>
                </li>
                <li class="J_tabCloseOther">
                    <a>@HCQ2_Common.LangHelper.GetValue("PageMain.mainCloseOther")</a>
                </li>
            </ul>
        </div>
        <a href="@Url.Action("Login", "SysLogin")" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> @HCQ2_Common.LangHelper.GetValue("PageMain.mainLogout")</a>
    </div>
    <div class="row J_mainContent" id="content-main">
        <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="@Url.Action("IndexPage", "Main")" frameborder="0" data-id="@Url.Action("IndexPage", "Main")" seamless></iframe>
        @*<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="@Url.Action("VRList", "SourceManager",new { pageType= "VRWorks", doc_type=3 })" frameborder="0" data-id="@Url.Action("VRList", "SourceManager",new { pageType= "VRWorks", doc_type=3 })" seamless></iframe>*@
    </div>
    <div class="footer gray-bg" style="border-top: 1px solid;">
        <div class="pull-right">
            &copy; 2019 @HCQ2_Common.LangHelper.GetValue("PageMain.mainVersion")：<a class="J_menuItem" href="@Url.Action("Index", "SoftVersion")">
            @{
                string sysVersion = ViewBag.sysVersion;
                if (string.IsNullOrEmpty(sysVersion))
                {
                    <span>@HCQ2_Common.LangHelper.GetValue("PageMain.maiDefVersion")</span>
                }
                else
                {
                    <span> @sysVersion</span>
                }
            }
            </a>
            <span id="nowTime"></span>
        </div>
    </div>
</div>
<!--右侧部分结束-->
<!--右侧边栏：设置开始-->
<div id="right-sidebar">
    <div class="sidebar-container">
        <ul class="nav nav-tabs navs-3">
            <li class="active" style="width:100px;">
                <a data-toggle="tab" href="#tab-1" style="font-size:15px;">
                    <i class="fa fa-gear"></i>@HCQ2_Common.LangHelper.GetValue("PageMain.mainSysSet")
                </a>
            </li>
            <li>
                <a data-toggle="tab" href="#tab-2">
                    @HCQ2_Common.LangHelper.GetValue("PageMain.mainThemeSet")
                </a>
            </li>
        </ul>
        <div class="tab-content">
            <div id="tab-1" class="tab-pane active">
                <div class="sidebar-title">
                    <h3>
                        <i class="fa fa-comments-o"></i> @HCQ2_Common.LangHelper.GetValue("PageMain.mainModelSel")
                    </h3>
                    <small><i class="fa fa-tim"></i> @HCQ2_Common.LangHelper.GetValue("PageMain.mainModelTip")</small>
                </div>
                <div class="skin-setttings">
                    <select id="sm_code" name="sm_code" class="form-control show-tick selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("PageMain.mainModelSel")"></select>
                </div>
            </div>
            <div id="tab-2" class="tab-pane">
                <div class="sidebar-title">
                    <h3>
                        <i class="fa fa-comments-o"></i> @HCQ2_Common.LangHelper.GetValue("PageMain.mainThemeSet")
                    </h3>
                    <small><i class="fa fa-tim"></i>@HCQ2_Common.LangHelper.GetValue("PageMain.mainThemeTip")</small>
                </div>
                <div class="skin-setttings">
                    <div class="title">@HCQ2_Common.LangHelper.GetValue("PageMain.mainThemeSet")</div>
                    <div class="setings-item">
                        <span>@HCQ2_Common.LangHelper.GetValue("PageMain.mainPutLeftMenu")</span>
                        <div class="switch">
                            <div class="onoffswitch">
                                <input type="checkbox" name="collapsemenu" class="onoffswitch-checkbox" id="collapsemenu">
                                <label class="onoffswitch-label" for="collapsemenu">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="setings-item">
                        <span>@HCQ2_Common.LangHelper.GetValue("PageMain.mainFixedTop")</span>
                        <div class="switch">
                            <div class="onoffswitch">
                                <input type="checkbox" name="fixednavbar" class="onoffswitch-checkbox" id="fixednavbar">
                                <label class="onoffswitch-label" for="fixednavbar">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="setings-item">
                        <span>
                                    @HCQ2_Common.LangHelper.GetValue("PageMain.mainFixedWidth")
                                </span>
                        <div class="switch">
                            <div class="onoffswitch">
                                <input type="checkbox" name="boxedlayout" class="onoffswitch-checkbox" id="boxedlayout">
                                <label class="onoffswitch-label" for="boxedlayout">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="title">@HCQ2_Common.LangHelper.GetValue("PageMain.mainSkinOptions")</div>
                    <div class="setings-item default-skin nb">
                        <span class="skin-name ">
                                    <a href="#" class="s-skin-0">
                                        @HCQ2_Common.LangHelper.GetValue("PageMain.mainDefaultSkin")
                                    </a>
                                </span>
                    </div>
                    <div class="setings-item blue-skin nb">
                        <span class="skin-name ">
                                    <a href="#" class="s-skin-1">
                                        @HCQ2_Common.LangHelper.GetValue("PageMain.mainBlueTheme")
                                    </a>
                                </span>
                    </div>
                    <div class="setings-item yellow-skin nb">
                        <span class="skin-name ">
                                    <a href="#" class="s-skin-3">
                                       @HCQ2_Common.LangHelper.GetValue("PageMain.mainYellowTheme")
                                    </a>
                                </span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--右侧边栏：设置结束-->
</div>
<!--登录信息-->
<div id="loginMessage" style="width: 300px; overflow: hidden; display: none;">
    <form class="form-horizontal" style="margin-left: 8px;" id="orgLoginTable" method="post">
        <div>
            <label class="control-label">@HCQ2_Common.LangHelper.GetValue("PageMain.mainToalLogin")：</label>
            <label id="login_count" name="login_count" class="control-label"></label>
        </div>
        <div>
            <label class="control-label">@HCQ2_Common.LangHelper.GetValue("PageMain.mainTheIP")：</label>
            <label id="login_ip" name="login_count" class="control-label"></label>
        </div>
        <div>
            <label class="control-label">@HCQ2_Common.LangHelper.GetValue("PageMain.mainTheTime")：</label>
            <label id="login_time" name="login_count" class="control-label"></label>
        </div>
        <div>
            <label class="control-label">@HCQ2_Common.LangHelper.GetValue("PageMain.mainLastIP")：</label>
            <label id="last_ip" name="login_count" class="control-label"></label>
        </div>
        <div>
            <label class="control-label">@HCQ2_Common.LangHelper.GetValue("PageMain.mainLastTime")：</label>
            <label id="last_time" name="login_count" class="control-label"></label>
        </div>
        <div>
            <label class="control-label"><font color="red">@HCQ2_Common.LangHelper.GetValue("PageMain.mainChangePwd")：</font>
                <a id="btnChangePwd" class="J_menuItem" href="@Url.Action("List", "SysUser")">@HCQ2_Common.LangHelper.GetValue("PageMain.mainChangeUserPwd")</a>
            </label>
        </div>
    </form>
</div>
<!-- 用户添加/编辑 -->
<div id="org_form" style="width: 460px; overflow: hidden; display: none;">
    <form class="form-horizontal m-t" id="orgFormTable" method="post">
        <div class="form-group">
            <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.userName")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-7">
                <input id="userName" name="userName" type="text" disabled="disabled" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.userName")"/>
                <input type="hidden" id="status" name="status" />
                <input type="hidden" id="user_id" name="user_id" />
                <input type="hidden" id="user_name" name="user_name" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.loginName")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-7">
                <input id="login_name" name="login_name" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.loginName")"  required="" aria-required="true" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.sex")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-7">
                <select id="user_sex" name="user_sex" class="form-control input-sm selectcontrol" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.sex")" style="padding: 5px 10px;">
                    <option value="男" selected>@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.sexMan")</option>
                    <option value="女">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.sexWoman")</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">QQ：</label>
            <div class="col-sm-7">
                <input id="user_qq" name="user_qq" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport") QQ" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.mail")：</label>
            <div class="col-sm-7">
                <input id="user_email" name="user_email" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.mail")" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.birthday")：</label>
            <div class="col-sm-7">
                <input id="user_birth" name="user_birth" type="text" class="laydate-icon form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.birthday") "onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.telephone")：</label>
            <div class="col-sm-7">
                <input id="user_phone" name="user_phone" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.telephone")" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.address")：</label>
            <div class="col-sm-7">
                <textarea class="form-control" id="user_address" name="user_address" rows="3" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.address")"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("GeneralJson.note")：</label>
            <div class="col-sm-7">
                <textarea class="form-control" id="user_note" name="user_note" rows="3" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("GeneralJson.note")"></textarea>
            </div>
        </div>
    </form>
</div>
<!--重置个人密码-->
<div id="resetPassWord" style="width: 460px; overflow: hidden; display: none;">
    <form class="form-horizontal m-t" id="resetFormPassWord" method="post">
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.original")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-7">
                <input id="oldPassword" name="oldPassword" type="password" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.original")" required="" aria-required="true" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.newPassword")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-7">
                <input id="newPassword" name="newPassword" type="password" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.newPassword")" required="" aria-required="true" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.conPassword")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-7">
                <input id="newPassword1" name="newPassword1" type="password" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("PublicSystem.UserList.conPassword")" required="" aria-required="true" />
            </div>
        </div>
    </form>
</div>
<!--上传头像-->
<div class="am-modal am-modal-no-btn up-frame-bj " tabindex="-1" id="doc-modal-1">
        <div class="am-modal-dialog up-frame-parent up-frame-radius">
            <div class="am-modal-hd up-frame-header">
                <label>@HCQ2_Common.LangHelper.GetValue("PageMain.mainEditHeader")</label>
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
            </div>
            <div class="am-modal-bd  up-frame-body">
                <div class="am-g am-fl">
                    <div class="am-form-group am-form-file">
                        <div class="am-fl">
                            <button type="button" class="am-btn am-btn-default am-btn-sm">
                                <i class="am-icon-cloud-upload"></i> @HCQ2_Common.LangHelper.GetValue("PageMain.mainSelectFile")
                            </button>
                        </div>
                        <input type="file" id="inputImage">
                    </div>
                </div>
                <div class="am-g am-fl">
                    <div class="up-pre-before up-frame-radius">
                        <img alt="" src="" id="image">
                    </div>
                    <div class="up-pre-after up-frame-radius">
                    </div>
                </div>
                <div class="am-g am-fl">
                    <div class="up-control-btns">
                        <span class="am-icon-rotate-left" onclick="rotateimgleft()"></span>
                        <span class="am-icon-rotate-right" onclick="rotateimgright()"></span>
                        <span class="am-icon-check" id="up-btn-ok" url="admin/user/upload.action"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
@Scripts.Render("~/bundles/indexScript")
<script>
    var lang;
    $(function () {
        //语言设置
        $('#langCode').initSelectcontrol("LanguageCode", true);
        $('#sm_code').initModuleSelectpicker();
        //语言设置
        $('#langCode').on('change', function () {
            var layerIndex = layer.msg(Lang.PageMain.changeLanguage, { icon: 16, shade: [0.3, '#393D49'], time: 0 });
            lange = $(this).val();
            //设置cookie
            document.cookie = "Language=" + lange;
            $.ajax({
                url: ctx + '/Main/SaveChangeLanuage',
                type: "post",
                async: false,
                data: { "lang": lange },
                dataType: 'json',
                success: function (mess) {
                    if (mess.Statu != 0)
                        layer.open({
                            shade: false,
                            title: false,
                            content: mess.Msg,
                            btn: ''
                        });
                    else
                        //刷新页面
                        window.location.href = "@Url.Content("~/")" +"Main/Index";
                },
                error: function () {
                    layer.msg('Data Exception~', { icon: 5 });
                }
            });
        });
        var lang = "@ViewBag.sysLange";
        if (!lang)
            lang = "cn";
        else {
            if (lang === "cn-CN")
                lang = "cn";
            else if (lang === "en-US")
                lang = "en";
        }
        //设置Logo
        var logoSrc = "@ViewBag.logoUrl";
        if (logoSrc)
            $('#logoUrl').attr("src", logoSrc);
        else
            $('#logoUrl').attr("src", "../Resources/mainFrame/img/main/main_head_" + lang + ".png");
        $('#langCode').selectpicker('refresh');
        $('#langCode').selectpicker('val', lang.toString());
        $('#langCode').selectpicker('refresh');
    });
    //系统时间显示
    setInterval(function () {
        if (!lang)
            lang = $.cookie("Language");
        if (!lang)
            lang = "cn";
        var str = new Date().toLocaleString(lang),
            weekday = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
        if (lang == "cn")
            str += " 星期" + "日一二三四五六".charAt(new Date().getDay());
        else
            str += " " + weekday[new Date().getDay()];
        document.getElementById('nowTime').innerHTML = str;
    }, 1000);
    //在主页通过url打开窗口
    function main_openWindowByLink(options) {
        return window.parent.custom.DialogIframe(options);
    }
</script>
</body>
</html>